package com.atguigu.commonutil;

/**
 * @author Aug28-tlsjn
 * @date 2020-06-29 Monday 15:33
 */
public enum ApiResult {

    /**
     * 操作成功
     */
    SUCCESS(200, "操作成功"),

    /**
     * 操作失败
     */
    ERROR(400, "操作失败");

    private int code;

    private String msg;

    ApiResult(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    @Override
    public String toString() {
        return String.valueOf(code);
    }
}
